﻿@using System.Security.Claims
<!Doctype html>
<html lang="zh-cn">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css">
    <script src="~/lib/jquery/dist/jquery.js"></script>
    <script src="~/lib/bootstrap/dist/js/popper.js"></script>
    <script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
    <title>@ViewBag.Title</title>
</head>
<body>
<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
    <a href="#" class="navbar-brand">
        <img width="30" height="30" class="d-inline-block align-top" src="https://v4.bootcss.com/assets/brand/bootstrap-solid.svg"
             alt="">
        管理后台
    </a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
            aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item active">
                <a asp-area="Admin" asp-controller="Product" asp-action="Index" class="nav-link">
                    <span class="glyphicon glyphicon-cog"></span> 商品管理
                </a>
            </li>
            <li class="nav-item">
                <a asp-area="Admin" asp-controller="Order" asp-action="Index" class="nav-link">
                    <span class="glyphicon glyphicon-lock"></span> 订单管理
                </a>
            </li>
            <li class="nav-item">
                <a asp-area="Admin" asp-controller="User" asp-action="Index" class="nav-link">
                    <span class="glyphicon glyphicon-list"></span> 用户管理
                </a>
            </li>
        </ul>
        <form action="" class="form-inline my-2 my-lg-0">
            <input type="search" placeholder="搜索内容" aria-label="Search" class="form-control mr-sm-2">
            <button class="btn btn-outline-light my-2 my-sm 0" type="submit">搜索</button>
        </form>
        <ul class="navbar-nav justify-content-end">
            <li class="nav-item">
                <a href="#" class="nav-link">
                    
                    @User.Claims.FirstOrDefault(claim => claim.Type == ClaimTypes.Name)?.Value
                </a>
            </li>
            <li class="nav-item">
                <a asp-area="Admin" asp-controller="Admin" asp-action="Logout" class="nav-link">
                    <span class="glyphicon glyphicon-eye-close"></span> 退出
                </a>
            </li>
        </ul>
    </div>
</nav>

<div class="container" style="margin-top:70px;">
    @RenderBody()
</div>
</body>
</html>